<?php
class productmaker
{
	private $opendiv;
	private $openpage_center;
	private $pagecenter_text;
	private $opentable;
	private $opentable_tr;
	private $opentable_td;
	private $td_button;
	private $td_content;
	private $td_image;
	private $a_cart;
	private $a_cart_close;
	private $a_info;
	private $a_info_close;
	private $close_a;
	private $closetable_td;
	private $closetable_tr;
	private $closetable;
	private $closediv;
	private $closespan;
	private $openspan_title;
	private $openspan_description;
	private $br;
	private $openspan_price;
	private $open_image;
	private $close_image;
	
	function __construct()
	{
		$this->opendiv='<div';
		$this->openpage_center=' id="Page_center">';
			$this->opentable='<table>';
				$this->opentable_tr='<tr>';
					$this->opentable_td='<td';
						$this->td_button=' class="page_center_button">';
						$this->a_cart='<a class="page_center_buy" href="';
						$this->a_cart_close='"><span>';
						$this->close_a='</span></a>';
						$this->a_info='<a class="page_center_info" href="';
						$this->a_info_close='"><span>';
						$this->close_a;
					$this->closetable_td='</td>';
					$this->opentable_td;
						$this->td_content=' class="page_center_content">';
						$this->opendiv;
						$this->pagecenter_text=' class="page_center_text">';
						$this->openspan_title='<span class="blue2">';
						$this->closespan='</span><br/>';
						$this->openspan_description='<span class="gray">';
						$this->closespan;
						$this->openspan_description;
						$this->closespan;
						$this->br='<br />';
						$this->openspan_price='<span class="green">';
						$this->closespan;
						$this->closediv='</div>';
					$this->closetable_td;
					$this->opentable_td;
						$this->td_image=' class="page_center_img2">';
						$this->open_image='<img src="';
						$this->close_image='"/>';
					$this->closetable_td;	
				$this->closetable_tr='</tr>';
			$this->closetable='</table>';
		$this->closediv;
	}
	
	function get_products()
	{//$this->opendiv.$this->openpage_center.$this->opentable.$this->opentable_tr.
		$product=$this->opentable_td.$this->td_button;
		$product.=$this->a_cart.sazizza1.$this->a_cart_close.$this->close_a.$this->a_info.sazizza2.$this->a_info_close.$this->close_a.$this->closetable_td;
		$product.=$this->opentable_td.$this->td_content.$this->opendiv.$this->pagecenter_text.$this->openspan_title.SucaCarlo.$this->closespan;
		$product.=$this->openspan_description.provadescrizione.$this->closespan.$this->openspan_description.sucacarloduca.$this->closespan;
		$product.=$this->br.$this->openspan_price.Euro123.$this->closespan.$this->closediv.$this->closetable_td;
		$product.=$this->opentable_td.$this->td_image.$this->open_image."img/photo4.gif".$this->close_image.$this->closetable_td;
		//$product.=$this->closetable_tr.$this->closetable.$this->closediv;
		return $product;
	}
	
	function list_product_home()
	{
		$list='<div id="Page_center"><table>';
	 		for ($i=1;$i<5;$i++)
	 		{
	 			if (($i%2)!=0)
	 			{
	 				$list.='<tr>';
	 			}
	 			$list.=$this->get_products();
	 			if (($i%2)==0)
	 			{
	 				$list.='</tr>';
	 			}
	 		}
	 		$list.='</table></div>';
	 		return $list;
		
	}
}